import { PenChildProps } from "@/types";
import { Space, Switch } from "antd";
import { FormRowCol } from "@/components/common/FormRowCol.tsx";

export function PenDisabled({ penOptions, setPenValue }: PenChildProps) {
  return (
    <>
      <Space
        style={{ padding: "10px" }}
        className={"w-full"}
        direction="vertical"
      >
        <FormRowCol label="禁止输入">
          <Switch
            checkedChildren="开启"
            unCheckedChildren="关闭"
            checked={penOptions.disableInput}
            onChange={(checked) => {
              setPenValue("disableInput", checked);
            }}
          />
        </FormRowCol>
        <FormRowCol label="禁止旋转">
          <Switch
            checkedChildren="开启"
            unCheckedChildren="关闭"
            checked={penOptions.disableRotate}
            onChange={(checked) => {
              setPenValue("disableRotate", checked);
            }}
          />
        </FormRowCol>
        <FormRowCol label="禁止缩放">
          <Switch
            checkedChildren="开启"
            unCheckedChildren="关闭"
            checked={penOptions.disableSize}
            onChange={(checked) => {
              setPenValue("disableSize", checked);
            }}
          />
        </FormRowCol>
        <FormRowCol label="禁用锚点">
          <Switch
            checkedChildren="开启"
            unCheckedChildren="关闭"
            checked={penOptions.disableAnchor}
            onChange={(checked) => {
              setPenValue("disableAnchor", checked);
            }}
          />
        </FormRowCol>
      </Space>
    </>
  );
}
